<!DOCTYPE HTML>
<html xmlns:th="http://www.thymeleaf.org"
      xmlns:layout="http://www.ultraq.net.nz/thymeleaf/layout"
      layout:decorate="~{admin/common/common}">
<head>
    <title>服务列表</title>
</head>

<body layout:fragment="content">
<form id="myForm" th:action="@{/edgeService/list}" th:method="get">
    <div class="page-container">
        <div class="text-c">
            <input type="text" class="input-text" style="width:150px" placeholder="输入服务编码" name="serviceId" th:value="${serviceId}"/>
            <input type="text" class="input-text" style="width:150px" placeholder="输入服务名称" name="serviceName" th:value="${serviceName}"/>
            <span class="select-box inline">
				<select name="status" class="select">
					<option value="">全部状态</option>
					<option value="1" th:selected="${status} eq 1">启用</option>
					<option value="0" th:selected="${status} eq 0">停用</option>
				</select>
			</span>
            <button type="submit" class="btn btn-success">
                <i class="Hui-iconfont">&#xe665;</i>
                搜服务
            </button>
        </div>
        <table class="table table-border table-bordered table-bg table-hover">
            <thead>
            <tr>
                <th scope="col" colspan="7">服务列表</th>
            </tr>
            <tr class="text-c">
                <th>服务编码</th>
                <th>服务名称</th>
                <th>服务类型</th>
                <th>更新时间</th>
                <th>描述</th>
                <th>服务状态</th>
            </tr>
            </thead>
            <tbody>
            <tr class="text-c" th:each="model:${pageInfo?.result}" th:object="${model}">
                <td th:text="*{serviceId}">d</td>
                <td th:text="*{serviceName}">d</td>
                <td>
                  <span th:if="*{serviceType} eq 1">停车场</span>
                  <span th:if="*{serviceType} eq 0">门禁</span>
                </td>
                <td th:text="*{#dates.format(updateTime, 'yyyy-MM-dd HH:mm')}">2014-6-11 11:11:42</td>
                <td th:text="*{serviceDescript}">d</td>
                <td class="td-status">
                  <span th:if="*{status} eq 1" class="label label-success radius">已启用</span>
                  <span th:if="*{status} eq 0" class="label radius">已停用</span>
                </td>
            </tr>
            </tbody>
        </table>
        <div th:replace="admin/common/page :: page"></div>
    </div>
</form>

<script type="text/javascript" th:src="@{/js/common/page.js}"></script>
<script th:inline="javascript">

</script>
</body>
</html>